﻿<%@ Page Language="C#" MasterPageFile="~/GoWLL.master" AutoEventWireup="true" CodeFile="editcomm.aspx.cs" Inherits="editcomm" Title="编辑社区" validateRequest="false" %>
<%@ Register tagprefix="tinymce" Namespace="Moxiecode.TinyMCE.Web" Assembly="Moxiecode.TinyMCE" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceMenu" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceMainText" Runat="Server">


<div id="contenttext">

<form id="Form1" runat="server">

<asp:FormView ID="FormView1" runat="server" AllowPaging="True" 
    DataKeyNames="ID" DataSourceID="SqlDataSource1">
    <EditItemTemplate>
        ID:
        <asp:Label ID="IDLabel1" runat="server" Text='<%# Eval("ID") %>' />
        <br />
        Title:
        <asp:TextBox ID="TitleTextBox" runat="server" Text='<%# Bind("Title") %>' />
        <br />
        url:
        <asp:TextBox ID="urlTextBox" runat="server" Text='<%# Bind("url") %>' />
        <br />
        CreateStatue:
        <asp:TextBox ID="CreateStatueCheckBox" runat="server" Text='<%# Bind("CreateStatue") %>'/>
        <br />
        RentStatue:
        <asp:TextBox ID="RentStatueTextBox" runat="server" 
            Text='<%# Bind("RentStatue") %>' />
        <br />
        Price:
        <asp:TextBox ID="PriceTextBox" runat="server" Text='<%# Bind("Price") %>' />
        <br />
        SellTime:
        <asp:TextBox ID="SellTimeTextBox" runat="server" 
            Text='<%# Bind("SellTime") %>' />
        <br />
        UserID:
        <asp:TextBox ID="UserIDTextBox" runat="server" Text='<%# Bind("UserID") %>' />
        <br />
        DayPV:
        <asp:TextBox ID="DayPVTextBox" runat="server" Text='<%# Bind("DayPV") %>' />
        <br />
        Profile:
        <tinymce:TextArea id="elm1" theme="simple" runat="server" Value='<%# Bind("Profile") %>' Width="500" Rows="20" Font-Size="Large" />
        <br />
        <asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" 
            CommandName="Update" Text="更新" />
        &nbsp;<asp:LinkButton ID="UpdateCancelButton" runat="server" 
            CausesValidation="False" CommandName="Cancel" Text="取消" />
    </EditItemTemplate>
    <InsertItemTemplate>
        Title:
        <asp:TextBox ID="TitleTextBox" runat="server" Text='<%# Bind("Title") %>' />
        <br />
        url:
        <asp:TextBox ID="urlTextBox" runat="server" Text='<%# Bind("url") %>' />
        <br />
        CreateStatue:
        <asp:TextBox ID="CreateStatueTextBox" runat="server" 
            Text='<%# Bind("CreateStatue") %>' />
        <br />
        RentStatue:
        <asp:TextBox ID="RentStatueTextBox" runat="server" 
            Text='<%# Bind("RentStatue") %>' />
        <br />
        Price:
        <asp:TextBox ID="PriceTextBox" runat="server" Text='<%# Bind("Price") %>' />
        <br />
        SellTime:
        <asp:TextBox ID="SellTimeTextBox" runat="server" 
            Text='<%# Bind("SellTime") %>' />
        <br />
        UserID:
        <asp:TextBox ID="UserIDTextBox" runat="server" Text='<%# Bind("UserID") %>' />
        <br />
        DayPV:
        <asp:TextBox ID="DayPVTextBox" runat="server" Text='<%# Bind("DayPV") %>' />
        <br />
        Profile:
        <asp:TextBox ID="ProfileTextBox" runat="server" Text='<%# Bind("Profile") %>' />
        <br />
        <asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" 
            CommandName="Insert" Text="插入" />
        &nbsp;<asp:LinkButton ID="InsertCancelButton" runat="server" 
            CausesValidation="False" CommandName="Cancel" Text="取消" />
    </InsertItemTemplate>
    <ItemTemplate>
        ID:
        <asp:Label ID="IDLabel" runat="server" Text='<%# Eval("ID") %>' />
        <br />
        Title:
        <asp:Label ID="TitleLabel" runat="server" Text='<%# Bind("Title") %>' />
        <br />
        url:
        <asp:Label ID="urlLabel" runat="server" Text='<%# Bind("url") %>' />
        <br />
        CreateStatue:
        <asp:Label ID="CreateStatueLabel" runat="server" 
            Text='<%# Bind("CreateStatue") %>' />
        <br />
        RentStatue:
        <asp:Label ID="RentStatueLabel" runat="server" 
            Text='<%# Bind("RentStatue") %>' />
        <br />
        Price:
        <asp:Label ID="PriceLabel" runat="server" Text='<%# Bind("Price") %>' />
        <br />
        SellTime:
        <asp:Label ID="SellTimeLabel" runat="server" Text='<%# Bind("SellTime") %>' />
        <br />
        UserID:
        <asp:Label ID="UserIDLabel" runat="server" Text='<%# Bind("UserID") %>' />
        <br />
        DayPV:
        <asp:Label ID="DayPVLabel" runat="server" Text='<%# Bind("DayPV") %>' />
        <br />
        Profile:
        <asp:Label ID="ProfileLabel" runat="server" Text='<%# Bind("Profile") %>' />
        <br />
        <asp:LinkButton ID="EditButton" runat="server" CausesValidation="False" 
            CommandName="Edit" Text="编辑" />
        &nbsp;<asp:LinkButton ID="DeleteButton" runat="server" CausesValidation="False" 
            CommandName="Delete" Text="删除" />
        &nbsp;<asp:LinkButton ID="NewButton" runat="server" CausesValidation="False" 
            CommandName="New" Text="新建" />
    </ItemTemplate>
</asp:FormView>



<asp:SqlDataSource ID="SqlDataSource1" runat="server" 
    ConnectionString="<%$ ConnectionStrings:GoWLLConnectionString %>" 
    DeleteCommand="DELETE FROM [GowllCommunitys] WHERE [ID] = @ID" 
    InsertCommand="INSERT INTO [GowllCommunitys] ([Title], [url], [CreateStatue], [RentStatue], [Price], [SellTime], [UserID], [DayPV], [Profile]) VALUES (@Title, @url, @CreateStatue, @RentStatue, @Price, @SellTime, @UserID, @DayPV, @Profile)" 
    SelectCommand="SELECT * FROM [GowllCommunitys]" 
    UpdateCommand="UPDATE [GowllCommunitys] SET [Title] = @Title, [url] = @url, [CreateStatue] = @CreateStatue, [RentStatue] = @RentStatue, [Price] = @Price, [SellTime] = @SellTime, [UserID] = @UserID, [DayPV] = @DayPV, [Profile] = @Profile WHERE [ID] = @ID">
</asp:SqlDataSource>



</form>
</div>

</asp:Content>

